package
{
	import flash.events.MouseEvent;

	public class MouseState
	{
		protected static var beginX:int = 0;
		protected static var beginY:int = 0;
		protected static var drag:Boolean = false;
		public function MouseState()
		{
			
		}
		public static function BeginDrag(event:MouseEvent):void
		{
			beginX = event.localX;
			beginY = event.localY;
			drag = true;
		}
		public static function IsDrag():Boolean
		{
			return drag;
		}
		public static function GetDX(event:MouseEvent):int
		{
			return event.localX - beginX;
		}
		public static function GetDY(event:MouseEvent):int
		{
			return event.localY - beginY;
		}
		public static function UpdateDrag(event:MouseEvent):void
		{
			beginX = event.localX;
			beginY = event.localY;
		}
		public static function EndDrag():void
		{
			drag = false;
		}
	}
}